import { BaseResponse } from '@/type/api'
import instance from './index'
/**
 * 获取问题
 */
export const getQuestion = (data = {}): Promise<BaseResponse> => {
  return instance.request({ url: '/api/v1/question', params: data, method: 'GET' })
}

/**
 * 题源
 */
export const getSource = (data = {}): Promise<BaseResponse> => {
  return instance.request({ url: '/api/v1/source', params: data, method: 'GET' })
}

/**
 * 评分
 */
export const sorce = (data = {}, id: number): Promise<BaseResponse> => {
  return instance.request({ url: '/api/v1/exam/score/' + id, data: data, method: 'POST' })
}

/**
 * 预约考试
 */
export const reservation = (data = {}, id: number): Promise<BaseResponse> => {
  return instance.request({ url: '/api/v1/exam/reservation/' + id, data: data, method: 'POST' })
}
